package org.phantom.securityframework.auth.realm;

import org.apache.shiro.cache.CacheManager;

import org.phantom.securityframework.api.factory.ManagerFactory;



/**
 * 认证/鉴权
 * @author david
 *
 */

public interface SubjectAuthRealm {
	
	/**
	 * 缓存管理
	 * @return
	 */
	CacheManager getCacheManager();
	/**
	 * 创建当前环境的SubjectPermissionRealms
	 * @param factory
	 * @return
	 * @throws Exception
	 */
	SubjectPermissionRealm[] buildSubjectPermissionRealms(ManagerFactory factory) throws Exception;
	/**
	 * 创建当前环境的SubjectRealm
	 * @param factory
	 * @return
	 * @throws Exception
	 */
	SubjectRealm buildSubjectRealm(ManagerFactory factory) throws Exception;
}
